#ifndef __FILESYSTEM__
#define __FILESYSTEM__

#define ATTR_READ_ONLY  0x01
#define ATTR_HIDDEN     0x02
#define ATTR_SYSTEM     0x04
#define ATTR_VOLUME_ID  0x08
#define ATTR_DIRECTORY  0x10
#define ATTR_ARCHIVE    0x20
#define ROOT_DIR        reservedSectors + (fatSize * fats)
#define FILE_TYPE 0x1
#define DIR_TYPE  0x2

typedef struct {
    int sektor;
    int size;
    int type;
    unsigned int addr;
}MyFile;

void initFilesystem();
unsigned short up(unsigned char b1,unsigned char b2);
unsigned short lo(unsigned char b1,unsigned char b2);
void readFAT();
MyFile decodePathToFile(char *path);
MyFile readFile(int entry, int size);
MyFile readDir(int sektor, const char *fname);
void diskInfo();

#endif
